{template aljbd:index_header}
{if $settings['templatepx']['value']}
	{template aljbd:footercss}
{/if}
<script type="text/javascript" src="static/js/calendar.js"></script>
<style type="text/css">
	.bdtr {
		 padding-left: 10px !important;
	}
</style>
<script charset="$_G['charset']" src="source/plugin/aljbd/js/editor/kindeditor-min.js" reload="true"></script>
<!--{if $_G['charset']=='gbk'}-->
<script charset="gbk" src="source/plugin/aljbd/js/editor/lang/zh_CN.js" reload="true"></script>
<!--{else}-->
<script charset="utf-8" src="source/plugin/aljbd/js/editor/lang/zh_CN_U8.js" reload="true"></script>
<!--{/if}-->
<script type="text/javascript" reload="true">
        KindEditor.ready(function(K) {
              window.editor = KindEditor.create('#intro', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : true,
					items : [
						'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        'superscript', 'clearhtml', 'quickformat', 'selectall', '/', 'fullscreen',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
        'table', 'hr', 'emoticons', 'pagebreak',
        'anchor', 'link', 'unlink']
				});
        });
		KindEditor.options.cssData = 'img { max-width:400px; }';
</script>
<div class="wp">
<div class="bm cl" id="pt">
<div class="z">
<a title="{$_G['setting']['bbname']}" class="nvhm" href="./">{$_G['setting']['bbname']}</a> <em>&rsquot;</em>
        <a href="plugin.php?id=aljbd">{$config['aljbd_plugins']}</a>
</div>
</div>
<div class="ct2_a wp cl" id="ct">
<div class="appl">
<div class="tbn">
<h2 class="mt bbda">{$config['aljbd_plugins']}</h2>
{template aljbd:mnav}
</div>
</div>
<iframe  name="formsubmit" style="display:none;"></iframe>
<div  style="float:left;">
<h1 class="ph mbm xi1" style="margin-left:10px;">{if $_GET['act']=='addgoods'}{lang aljbd:s281}{else}{lang aljbd:s282}{/if}</h1>
<form enctype="multipart/form-data" target="formsubmit"  action="plugin.php?id=aljbd&act={$_GET['act']}" autocomplete="off" id="addgoods_form" method="post">
 <input type="hidden" name="formhash" value="{FORMHASH}">
 <input type="hidden" name="gid" value="{$_GET['gid']}">
<input type="hidden" name="bid" value="{$bid}">
 <input type="hidden" name="compress" value="" id="compress">
 <input type="hidden" name="aljbd_goods_token" value="{eval echo create_token('aljbd_goods_token');}">
  <table cellspacing="0" cellpadding="0" class="tfm">
      <tbody>
          <tr>
              <th class="bdtr"><span style="color:red;">*</span>{lang aljbd:s283}</th>
				<td>
					{eval echo dhtmlspecialchars($bd['name']);}
				</td>
              <td>&nbsp;</td>
          </tr>
		  <tr><td class="bdtr"><span style="color:red;">*</span>{lang aljbd:s284}</td><td><input type="text" class="px" name="name" value="$g['name']"></td></tr>
		  <tr><td class="bdtr"><span style="color:red;">*</span>&#21830;&#21697;&#29366;&#24577;</td><td>
<label class="lb"><input type="radio" name="state" value="0" class="pc" {if !$g['state']}checked="checked"{/if}>&#19978;&#26550;</label>
<label class="lb"><input type="radio" name="state" value="1" class="pc" {if $g['state'] == 1}checked="checked"{/if}>&#19979;&#26550;</label>
</td></tr>
		  <tr>
						<td class="bdtr"><span style="color:red;">*</span>{lang aljbd:s223}</td>
    				<td colspan="4">
						<select name="type" id="type" style="width:120px;" data-id="1" onchange="getregion(this,'goods')">
							<option value="">{lang aljbd:s224}</option>
							<!--{loop $typelist $typeid $type}-->
							<option value="$typeid" {if $typeid==$g['type']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						&nbsp;&nbsp;&nbsp;
						<span name="subtype" id="subtype">
						{if $g['subtype']}
						<select name="subtype" id="type" style="width:120px;"  onchange="getregion(this,'goods')">
							<!--{loop C::t('#aljbd#aljbd_type_goods')->fetch_all_by_upid($g['type']) $typeid $type}-->
							<option value="$typeid" {if $typeid==$g['subtype']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						{/if}
						</span>
						<span id="subtype3">
						{if $g['subtype3']}
						<select name="subtype3" style="width:120px;">
							<!--{loop C::t('#aljbd#aljbd_type_goods')->fetch_all_by_upid($g['subtype']) $typeid $type}-->
							<option value="$typeid" {if $typeid==$g['subtype3']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						{/if}
						</span>
					</td>
				</tr>
				<script type="text/javascript">
				function getregion(t,u){
					var url ='';
					if(u){
						url = '&type='+u; 
					}
					if(u !='u'){
						var name = 'subtype3';
						if(jq(t).attr('data-id') == 1){
							var name = 'subtype';
						}
					}else{
						var name = 'region1';
						if(jq(t).attr('data-id') == 1){
							var name = 'subregion';
						}
					}
					var str = '<select name="'+name+'" onchange="getregion(this,\''+u+'\')" style="width:120px;"><option value="">\u8bf7\u9009\u62e9</option>';
					jq.post('plugin.php?id=$pluginid&act=linkage&upid='+jq(t).val()+url,function(data){
						if(data){
							jq.each(data,function(k,d){
							str+='<option value="'+k+'">'+d+'</option>';
							});
							str+='</select>';
							jq(t).next().remove();
							jq(t).after(str);
						}
						
					}, "json");
				}
				</script>
		  <tr><td class="bdtr"><span style="color:red;">*</span>{lang aljbd:s285}</td><td><input type="text" class="px" name="price1" value="$g['price1']"></td></tr>
		  <tr><td class="bdtr"><span style="color:red;">&nbsp;</span>{lang aljbd:s286}</td><td><input type="text" class="px" name="price2" value="$g['price2']"></td></tr>
		  <tr><td class="bdtr"><span style="color:red;">*</span>{lang aljbd:amount}</td><td><input type="text" class="px" name="amount" value="$g['amount']"></td></tr>
		  {if $_G['cache']['plugin']['aljgwc'][$pluginid]}
		  <tr><td class="bdtr"><span style="color:red;">&nbsp;</span>&#36816;&#36153;</td><td><select name="fare_desc" id="fare_desc">
			{loop $fare_desc $k $v}
			<option {if $g[fare_desc] == $k && $g[fare_desc]!='999999'}selected{/if}value="$k">$v
			{/loop}
			<option value="999999" {if $g[fare_desc]=='999999'}selected{/if}>&#33258;&#23450;&#20041;&#37038;&#36153;
		  </select></td></tr>
		  <tr {if $g[fare_desc]!='999999'}style="display:none"{/if} id="fare"><td class="bdtr"><span style="color:red;">&nbsp;</span>&#36816;&#36153;&#37329;&#39069;</td><td><input type="text" class="px" name="fare" value="$g['fare']"></td></tr>
<script src="source/plugin/aljbd/js/jquery.js"></script>
<script type="text/javascript">
    var fare_jq = jQuery.noConflict();
</script>
<script type="text/javascript">
fare_jq('#fare_desc').change(function() { 
	if(fare_jq("#fare_desc").val()=='999999'){
		fare_jq("#fare").show();
	}else{
		fare_jq("#fare").hide();
	}
});
</script>
		  {/if}
		    <tr><td class="bdtr"><span style="color:red;">&nbsp;</span>{lang aljbd:tg112}</td><td><input placeholder="&#30041;&#31354;&#27704;&#20037;&#26377;&#25928;" type="text" class="px" name="endtime" onclick="showcalendar(event, this)" value="{if $g['endtime']}{eval echo gmdate('Y-m-d',$g['endtime']+8*3600);}{/if}">&nbsp;{lang aljbd:Time_annotation}</td></tr>
		{eval $shoppic = array('pic1','pic2','pic3','pic4','pic5');}
		{eval $i = 1}
		{loop $shoppic $v}
		<tr>
              <th class="bdtr"><span style="color:red;">*</span>{lang aljbd:s287}{$i}</th>
              <td><span id="{$v}"><input type="file"  name="$v" onchange="lrz_mobile('$v',this)"></span>{if $v == 'pic1'}&#23553;&#38754;&#22270;&#29255;{/if}<br><span id="img_{$v}">{if $g[$v]}<img src="$g[$v]" width="80" height="80">{/if}</span></td>
              <td>&nbsp;</td>
        </tr>
		{eval $i++}
		{/loop}
		
		{if !$settings['good_wurl']['value']}
		<tr>
				<td class="bdtr"><span style="color:red;">&nbsp;</span>{lang aljbd:gwurl_1}</td>
				<td colspan="4">
					
					<input type="text" name="gwurl" class="pt" id="replymessage" style="background:#FFF;" value="{$g['gwurl']}">&nbsp;{lang aljbd:gwurl_2}
					
				</td>
				
				</tr>
		{/if}
		  <tr><td class="bdtr"><span style="color:red;">&nbsp;</span>{lang aljbd:s288}</td><td><textarea name="intro"  id="intro" style="height:500px;">$g['intro']</textarea></td></tr>
          <tr>
              <th></th>
              <td colspan="2"><button  class="pn pnc vm" value="true" id="submit" name="submit" type="submit" onClick="javascript:checkhHtml5();"><strong>{lang aljbd:s289}</strong></button></td>
          </tr>
      </tbody>
  </table>
  </form>
</div></div></div>
{template aljbd:img_js}
{template common/footer}